#pragma once

#include "MathTypes.h"
#include "Mesh3d.h"

/*
Class MeshFactory is responsible for building 3d meshes structures
*/
class MeshFactory
{
public:
	enum ESphereBuild
	{
		FROM_TETRAHEDRON,
		FROM_OCTAHEDRON,
		FROM_ICOSAHEDRON
	};
	/*
	The method buildSphere allows you to build a sphere through a polyhedron subdivision.
	It is possible to select the starting polyhedron by using the ESphereBuild enum.
	It is also possible to define the number of subdivision that will be applied to the selected polyhedron,
	where the resulting number of vertices will be equals to 3*polyhedron_triangle_count*4^subdivisions.
	The output mesh will be returned on mshDest object.
	*/
	static void buildSphere(Mesh3d& mshDest, MeshFactory::ESphereBuild mode=FROM_OCTAHEDRON, UINT32 iSubdivisionMult=3);
};